<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>积分兑换详情列表</title>
    <link rel="stylesheet" href="/html/layui/css/layui.css" media="all" />

</head>
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp"/>
<link rel="stylesheet" type="text/css" href="__TMPL__/public/assets/css/base_h5.css?v=11">
<link rel="stylesheet" type="text/css" href="__TMPL__/public/assets/fonts/mobile/iconfont.css">
<link rel="stylesheet" type="text/css" href="__TMPL__/public/assets/plugins/layui/css/layui.css">
<style>
    .iconfont {
        font-size: 75px;
    }
</style>
<body>
<div class="jfdhBlockSty" style=" background-color: rgb(56,140,228)">
   <div class="jfdhTitle" style="font-size: 5em;color: white" >
       <!--<a href="{:url('mobile/personal/index')}">-->
           <!--<svg t="1574837918381" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1888" width="64" height="64"><path d="M983.7 468H132.5l408-404.8c14.9-14.9 14.9-37.5 0-52.4-14.9-14.9-39.1-14.1-54 0.8L13.3 485.2c-7.2 7.2-11.2 17.1-11.2 27.2 0 10.1 4 20 11.2 27.1l473.2 473.3c7.5 7.5 17.2 11.2 27 11.2s19.5-3.7 27-11.2c14.9-14.9 14.9-38.5 0-53.4L132.5 552h851.2c21.1 0 38.2-20.9 38.2-42s-17.1-42-38.2-42z" p-id="1889" fill="#ffffff"></path></svg>        </a>-->
      <empty name="list">暂无数据~</empty>
    </div>
</div>
<!--<div class="head">-->
    <!--<div class="head-title"><a href="javascript:;" class="backTop" onclick="javascript:history.back(-1);">-->
        <!--<i class="layui-icon layui-icon-left"></i>-->
    <!--</a>积分兑换列表</div>-->
<!--</div>-->
<foreach name="list" id="vo">

<div class="jfdhBlockSty">
    <div class="jfdhTitle">{$vo.goods.name}</div>
    <div class="jfdhContent">
        <div class="jfImg">
            <img src="__TMPL__/public/assets/img/jf.png" class="jfImgSty">
        </div>
        <div class="jfNum">{$vo.point}</div>
        <div class="jfImg margin-leftJf">
            <img src="__TMPL__/public/assets/img/time.png" class="jfImgSty">
        </div>
        <div class="jfNum">{$vo.ctime|date="Y-m-d H:i"}</div>
        <if condition="$vo.status==1">
        <div class="jfNum redColor margin-leftJfZt">已使用</div>
            <else/>
            <div class="jfNum greenColor margin-leftJfZt">可用</div>
            </if>
        <div class="jfrightSty">
            <if condition="$vo.status==0">
                <button class="layui-btn qrcode"  data-code="{$vo.qrcode|get_qrcode}">查看二维码</button>
                <else/>
            <button class="layui-btn layui-btn-danger del" data-id="{$vo.id}">删除</button></if>
        </div>
        <div style="clear: both;"></div>
    </div>
</div>
</foreach>
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/plugins/layui/layui.js"></script>
<include file="public@mobile_footer_nav">
    <include file="public@mobile_footer">
</body>
<script>
    layui.use([ 'layer'], function(){
    $(".del").on('click',function(e){
        var layer = layui.layer;
        var id=e.target.dataset.id
        layer.msg('确定要删除么？', {
            time: 0 //不自动关闭
            ,btn: ['是滴', '算了']
            ,yes: function(index){
                $.ajax({
                    type: "GET",
                    url: "log_del",
                    data: {'id':id},
                    success: function(data){
                        layer.msg(data.errmsg);
                        if(data.error==false){
                            layer.close(index);
                            layer.msg('删除成功！', {time: 2000, icon:6},window.location.reload());
                        }
                    }
                });

            }
        });
    }) })
    $(".qrcode").on('click',function (e) {
        var code = e.target.dataset.code
        var html="<img style='height: 500px;width: 500px;' src="+code+">";
        layer.open({
            type : 1,
            title : false,
            closeBtn : 0,
            shade: [0.001, '#393D49'],
            area : '500px',
            skin : 'layui-layer-nobg', //沒有背景色
            shadeClose : true,
            content : html
        });
    })

</script>

</html>